package container

import (
	"slices"
)

//go:force inline
func RemoveFromSlice[T comparable](targetArr []T, val T) []T {
	if len(targetArr) <= 0 {
		return []T{}
	}
	return slices.DeleteFunc(targetArr, func(t T) bool {
		return t == val
	})
}
